<?php
include '../../../common.inc.php';
include 'fun.php';
$mysqli = new mysqli('localhost', 'root', '', 'test_data');
$sql = "select id, py_lower from koubei_myisam2 where length(py_lower) <4 order by id desc limit 100";
$result = $mysqli->query($sql);
$res = $result->fetch_all(MYSQLI_ASSOC);
if (!$res) exit('No More Results');
foreach ($res as $r) {
	$py = $r['py_lower'] .'_'. str2py($r['chengshi']);
	$sql = "update koubei_myisam2 set py_lower ='{$py}' WHERE ID = {$r['id']}";
	$mysqli->query($sql);
}
echo '<meta http-equiv="refresh" content="3; url='.$_SERVER['PHP_SELF'].'" />';
echo '<pre style="font-size:300px;">';
echo $r['id'];

?>